FROM centos:8

RUN mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup \
    && curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo  \
    && yum makecache \
    && yum -y install git \
    && yum -y install python36 \
    && yum -y install gcc \
    && yum -y install python36-devel \
    && yum -y install mysql-devel \
    && pip3 install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple 
COPY code/requirements.txt /requirements.txt
RUN pip install uwsgi -i https://pypi.tuna.tsinghua.edu.cn/simple --default-timeout=200 \
    && pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple --default-timeout=200 \
    && rm requirements.txt 

EXPOSE 8000
